package com.beijing.seventykg.dao;

import com.beijing.seventykg.base.BaseDao;
import com.beijing.seventykg.po.Book;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by 70kg on 2017-06-28 15:12:31
 */
@Repository
public class BookDAOImpl extends BaseDao implements BookDAO {

	@Override
	public List<Book> getAllBooks() {
		List<Book> list = (List<Book>) this.getHibernateTemplate().find("from Book");
		return list;
	}

	@Override
	public Book getBookById(int id) {
		return null;
	}

	@Override
	public int add(Book entity) {
		return 0;
	}

	@Override
	public int delete(int id) {
		return 0;
	}

	@Override
	public int update(Book entity) {
		return 0;
	}
}